﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;





namespace MP3
{
	/// <summary>
	/// Interaction logic for MainWindow.xaml
	/// </summary>
	public partial class MainWindow : Window
	{

        MediaPlayer player = new MediaPlayer();
        int numberPlaylists = 0;
        PlayList[] playlists = new PlayList[10];

        
		public MainWindow()
		{
			this.InitializeComponent();
            
            
            
			// Insert code required on object creation below this point.
		}

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            volume_slider.Value = player.Volume * 100;
            balance_slider.Value = player.Balance * 50 + 50;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            
                        
        }

        private void volume_slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            player.Volume = volume_slider.Value / 100.0;
        }

        private void balance_slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            player.Balance = (balance_slider.Value - 50) / 50.0;
        }

        private void plus_button_Click(object sender, RoutedEventArgs e)
        {
            playlists[numberPlaylists] = new PlayList();
            playlists[numberPlaylists].Show();
            numberPlaylists++;
        }
		
		
		
	}
	
	
}